<#-- // Fields -->

<#foreach field in pojo.getAllPropertiesIterator()>
	<#if pojo.getMetaAttribAsBool(field, "gen-property", true)> 
		<#foreach column in field.columnIterator> 
		<#if column.comment?exists && column.comment?trim?length!=0>
		
		/**
		 * ${column.comment}
		 */</#if></#foreach><#include "Ejb3FieldGetAnnotation.ftl"/>		
		${pojo.getFieldModifiers(field)} 
			
		<#assign fieldname = field.name/>
				
		<#if fieldname == "secRolesPerUsersForUpdatedByFk">
			<#assign fieldname = "SecRolesPerUser"/>
		<#elseif fieldname == "documentStatusesForUpdatedByFk">
			<#assign fieldname = "DocumentStatus"/>		
		<#elseif fieldname == "secRolesPerUsersForUserFk">
			<#assign fieldname = "SecRolesPerUser"/>		
		<#elseif fieldname == "documentStatusesForSecUsersFk">
			<#assign fieldname = "DocumentStatus"/>		
		<#elseif fieldname == "caaBranchsForResponsibleSmFk">
			<#assign fieldname = "CaaBranch"/>				
		<#elseif fieldname == "caaBranchsForDirectorFk">
			<#assign fieldname = "CaaBranch"/>	
		<#elseif fieldname == "caaBranchsForContactPersonFk">
			<#assign fieldname = "CaaBranch"/>				
		<#elseif fieldname == "caaBranchsForTechnicalManagerFk">
			<#assign fieldname = "CaaBranch"/>				
		<#else>							
			<#assign fieldname = fieldname?cap_first/> 		
			<#if fieldname?ends_with("ses")>
				<#assign fieldname = fieldname?substring(0,fieldname?length-2)/> 	
			<#else>
			<#if fieldname?ends_with("s")>
				<#assign fieldname = fieldname?substring(0,fieldname?length-1)/> 
			</#if>		
			</#if>		
		</#if>		
		
		
		<#assign typename = pojo.getJavaTypeName(field, jdk5)/> 							 				
		<#if pojo.hasFieldInitializor(field, jdk5)> 
			<#assign init = pojo.getFieldInitialization(field, jdk5)/> 							 				
			<#if typename.startsWith("Set")>
				<#assign init=init.replaceFirst("HashSet","ArrayList<${fieldname}>")/> 							 	</#if>			
			</#if>
		<#if typename.startsWith("Set")>
			<#assign typename=typename.replaceFirst("Set","List<${fieldname}>")/>
		</#if>					
		${typename} ${field.name}				
		<#if pojo.hasFieldInitializor(field, jdk5)> = ${init}
		</#if>;
	</#if>
</#foreach>
